<%_
  var need_charset = false;
  glyphs.forEach(function(g) {
    if (0xffff < g.code) { need_charset = true; }
  });
_%>
<%_ if (need_charset) { _%>
@charset "UTF-8";
<%_ } _%>
<%_ var rnd = Math.floor(Math.random()*100000000); _%>
@font-face {
  font-family: '<%- font.fontname %>';
  src: url('../font/<%- font.fontname %>.eot?<%- rnd %>');
  src: url('../font/<%- font.fontname %>.eot?<%- rnd %>#iefix') format('embedded-opentype'),
       url('../font/<%- font.fontname %>.svg?<%- rnd %>#<%- font.fontname %>') format('svg');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: '<%- font.fontname %>';
  src: url('data:application/octet-stream;base64,%WOFF64%') format('woff'),
       url('data:application/octet-stream;base64,%TTF64%') format('truetype');
}
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
/*
@media screen and (-webkit-min-device-pixel-ratio:0) {
  @font-face {
    font-family: '<%- font.fontname %>';
    src: url('../font/<%- font.fontname %>.svg?<%- rnd %>#<%- font.fontname %>') format('svg');
  }
}
*/

<%_ if (!meta.css_use_suffix) { _%>
[class^="<%- meta.css_prefix_text %>"]:before, [class*=" <%- meta.css_prefix_text %>"]:before {
<%_ } else { _%>
[class$="<%- meta.css_prefix_text %>"]:before, [class*="<%- meta.css_prefix_text %> "]:before {
<%_ } _%>
  font-family: "<%- font.fontname %>";
  font-style: normal;
  font-weight: normal;
  speak: never;

  display: inline-block;
  text-decoration: inherit;
  width: 1em;
  margin-right: .2em;
  text-align: center;
  /* opacity: .8; */

  /* For safety - reset parent styles, that can break glyph codes*/
  font-variant: normal;
  text-transform: none;

  /* fix buttons height, for twitter bootstrap */
  line-height: 1em;

  /* Animation center compensation - margins should be symmetric */
  /* remove if not needed */
  margin-left: .2em;

  /* you can be more comfortable with increased icons size */
  /* font-size: 120%; */
  
  /* Font smoothing. That was taken from TWBS */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Uncomment for 3D effect */
  /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
}
<%_
  function unichr(code) {
    if (code > 0xffff) {
      code -= 0x10000;
      surrogate1 = 0xd800 + (code >> 10);
      surrogate2 = 0xdc00 + (code & 0x3ff);
      return String.fromCharCode(surrogate1, surrogate2);
    } else {
      return String.fromCharCode(code);
    }
  }

  function pad(s) {
    return s.length === 3 ? '0' + s : s;
  }

  var i, g, css, hex, chr;
_%>

<%_ for (i in glyphs) { _%>
  <%_
    g = glyphs[i];
    css = meta.css_use_suffix ? g.css + meta.css_prefix_text : meta.css_prefix_text + g.css;
    hex = '\\' + pad(g.code.toString(16));
    chr = unichr(g.code);
  _%>
  <%_ if (0xffff < g.code) { _%>
.<%- css %>:before { content: '<%- chr %>'; } /* '<%- hex %>' */
  <%_ } else { _%>
.<%- css %>:before { content: '<%- hex %>'; } /* '<%- chr %>' */
  <%_ } _%>
<%_ } _%>
